const express = require('express')
const accessToken = require('./access_token/access_token.router')
const administrator = require('./administrator/administrator.router')
const authentication = require('./authentication/authentication.router')
const me = require('./me/me.router')
const utilityToken = require('./utility_token/utility_token.router')
const wallet = require('./wallet/wallet.router')

const router = express.Router()
router.use(accessToken)
router.use(administrator)
router.use(authentication)
router.use(me)
router.use(utilityToken)
router.use(wallet)

router.get(
  `/ping`,
  async (req, res, next) => {
    try {
      return res.json({ success: true })
    } catch (error) {
      return next(error)
    }
  },
)

module.exports = router
